package pt.ist.meic.pava;

import javassist.CtClass;

/**
 * 
 * @author Antonio Massingue
 * @author Joao Matos
 * @author Nuno Santos
 * 
 * This Exception should be thrown when a 
 * non-abstract class is annotated with the
 * @Trait annotation
 * 
 */
public class MissingTraitAbstractKeyWordException extends Exception {

	/**
	 * The Serial Version Id
	 */
	private static final long serialVersionUID = 1232733434426739046L;

	/**
	 * The annotated class
	 */
	private CtClass ACtClass;
	
	
	
	
	
	
	/**
	 * Default Constructor
	 */
	public MissingTraitAbstractKeyWordException() {
		super();
	}

	/**
	 * Overloaded Constructor
	 * @param aClass - The annotated class
	 */
	public MissingTraitAbstractKeyWordException(CtClass aClass){
		super();
		this.ACtClass = aClass;
	}
	
	
	
	
	
	/**
	 * This method prints the detailed message of this exception
	 */
	public void printMissingTraitAbstractKeyWordException() {
		System.err.println("Its missing the Abstract keyword on the definition of the Trait "+this.ACtClass.getName());
	}

	/**
	 * @return the annotated class
	 */
	public CtClass getACtClass() {
		return ACtClass;
	}

	/**
	 * @param aCtClass The annotated class
	 */
	public void setACtClass(CtClass aCtClass) {
		ACtClass = aCtClass;
	}
}
